package sort2;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;
import sort1.FlowBean;

import java.io.IOException;

public class FlowCountSortReducer extends Reducer<FlowBean, Text,Text,FlowBean> {

    @Override
    protected void reduce(FlowBean key, Iterable<Text> values,Reducer<FlowBean,Text,Text,FlowBean> .Context context) throws IOException, InterruptedException {

        //facebook.com	Social Networks	880000000	47.2	9.1E+11	Yes	Yes	com
        for (Text value:values){
            context.write(value,key);
        }
    }
}
